import { NgModule } from "@angular/core";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { CommonModule } from "@angular/common";
import { PreloadAllModules, RouterModule, Routes } from "@angular/router";
import { NotfindCompontent } from "./notfind.compontent";
import { UsercoreComponent } from "./usercore.component";
import { FileUploadModule } from "ng2-file-upload";
import { DynaCompArr } from "./dynacomponent/dynamaner.component";
import { MypreloadService } from "./mypreload.service";
import { LoginComponent } from "./login.component";
import { WjmmComponent } from "./wjmm.component";
import { PublicCompModule } from "./pubcomponent/public-comp.module";
// 直接导入组件 
import { ZhzsComponent } from './sjgzxin.zs/zhzs.component'
import { YwclComponent } from "./sjgzxin.zs/ywcl.component";
import { BmsjkdComponent } from "./sjgzxin.zs/bmsjkd.component";
import { TjbbSjbcktjComponent } from "./sjgzxin.zs/tjbb-sjbcrktj.component";
import { TjbbSjbcrktjZHComponent } from "./sjgzxin.zs/tjbb-sjbcrktjZH.component";
import { TjbbSbzlComponent } from "./sjgzxin.zs/tjbb-sbzl.component";
import { TjbbSbzlZHComponent } from "./sjgzxin.zs/tjbb-sbzlZH.component";
import { TjbbSbxqComponent } from "./sjgzxin.zs/tjbb-sbxq.component";
import { TjbbSbxqZHComponent } from "./sjgzxin.zs/tjbb-sbxqZH.component";
import { TjbbGjzlComponent } from "./sjgzxin.zs/tjbb-gjzl.component";
import { TjbbGjzlZHComponent } from "./sjgzxin.zs/tjbb-gjzlZH.component";
import { TjbbGjxqComponent } from "./sjgzxin.zs/tjbb-gjxq.component";
import { TjbbGjxqZHComponent } from "./sjgzxin.zs/tjbb-gjxqZH.component";
import { TjbbGjszComponent } from "./sjgzxin.zs/tjbb-gjsz.component";
// 第二个页面
import { SjbxxglComponent } from "./sjgzxin.jcsj/sjbxxgl.component";
import { BqsbglComponent } from "./sjgzxin.jcsj/bqsbgl.component";
import { ZdsbglComponent } from "./sjgzxin.jcsj/zdsbgl.component";
import { SbgjglComponent } from "./sjgzxin.jcsj/sbgjgl.component";
import { RyglComponent } from "./sjgzxin.jcsj/rygl.component";
import { CarglComponent } from "./sjgzxin.jcsj/cargl.component";
import { YyjhComponent } from "./sjgzxin.jcsj/yyjh.component";
import { YyrwComponent } from "./sjgzxin.jcsj/yyrw.component";
import { SjcrkComponent } from "./sjgzxin.jcsj/sjcrk.component";
import { ZdsbxTsgjComponent } from "./sjgzxin.jcsj/zdsbx-tsgj.component";
import { BqsbxTsgjComponent } from "./sjgzxin.jcsj/bqsbx-tsgj.component";
// 第三个页面
import { LlSczdComponent } from "./sjgzxin.wb/ll-sczd.component";
import { LlDzbqComponent } from "./sjgzxin.wb/ll-dzbq.component";
import { DlDzbqComponent } from "./sjgzxin.wb/dl-dzbq.component";
//==================================
import { JcsjSliderComponent } from './sjgzxin.jcsj/jcsj-slider.component';
import { JcsjComponent } from './sjgzxin.jcsj/jcsj.component';
import { LsgJComponent } from './sjgzxin.jcsj/lsgJ.component';
import { SsgJComponent } from './sjgzxin.jcsj/ssgJ.component';
import { YyjhAddComponent } from './sjgzxin.jcsj/yyjh-add.component';
import { DlDzbqZHComponent } from './sjgzxin.wb/dl-dzbqZH.component';
import { DlSczdComponent } from './sjgzxin.wb/dl-sczd.component';
import { LlDzbqZHComponent } from './sjgzxin.wb/ll-dzbqZH.component';
import { LlSczdZHComponent } from './sjgzxin.wb/ll-sczdZH.component';
import { WbSliderComponent } from './sjgzxin.wb/wb-slider.component';
import { WbComponent } from './sjgzxin.wb/wb.component';
import { GjhfComponent } from './sjgzxin.zs/gjhf.component';
import { TjbbSliderComponent } from './sjgzxin.zs/tjbb-slider.component';
import { test1Component } from './test1.component'

const approuters: Routes = [{
  path: "",
  redirectTo: "/zszhzs",
  pathMatch: "full"
},
// 综合展示
{ path: "zszhzs", component: ZhzsComponent },
// 押运车辆
{ path: "zsywcl", component: YwclComponent },
// 保密室及考点*
{ path: 'zsbmskd', component: BmsjkdComponent },
// 统计报表
// -试卷包出入库统计*
{ path: 'zstjbb', component: TjbbSjbcktjComponent },
// -设备总览*
{ path: 'snzl', component: TjbbSbzlComponent },
// -设备详情*
{ path: 'sbxq', component: TjbbSbxqComponent },
// -告警总览*
{ path: 'gjzl', component: TjbbGjzlComponent },
// -告警详情*
{ path: 'gjxq', component: TjbbGjxqComponent },
// -告警配置*
{ path: 'gjsz', component: TjbbGjszComponent },

// 基础数据 > 数据准备------------------------------------------------
// -试卷包信息
{ path: 'sjbxxx', component: SjbxxglComponent },
// -标签设备管理
{ path: 'bqsbx', component: BqsbglComponent },
// -手持终端设备管理
{ path: 'zdsbx', component: ZdsbglComponent },
// -设备固件管理
{ path: 'sbgjglx', component: SbgjglComponent },
// -押运人员管理
{ path: 'ryglx', component: RyglComponent },
// -运送车辆管理
{ path: 'carglx', component: CarglComponent },//--
// -试卷运送计划
{ path: 'yyjhx', component: YyjhComponent },
// -试卷运送任务
{ path: 'yyrwx', component: YyrwComponent },
// -试卷出入库记录
{ path: 'sjcrkx', component: SjcrkComponent },
// 基础数据 > 调试助手工具
// -终端上报
{ path: 'zdsbx_tsgj', component: ZdsbxTsgjComponent },
// -标签上报
{ path: 'bqsbx_tsgj', component: BqsbxTsgjComponent },

// 设备运维 > 流量统计------------------------------------------------
// -手持终端流量
{ path: 'llsczd', component: LlSczdComponent },
// -电子标签流量
{ path: 'lldzbq', component: LlDzbqComponent },
// 设备运维 > 电量统计
// 电子标签电量
{ path: 'dldzbq', component: DlDzbqComponent },
{ path: 'test1', component: test1Component },
]

@NgModule({
  imports: [
    FormsModule,
    ReactiveFormsModule,
    CommonModule,
    PublicCompModule,
    FileUploadModule,
    RouterModule.forRoot(approuters, {
      enableTracing: false,
      // 系统在优先显示首页后，在后台默默加载设置了预加载的模块。在这里简单设置为所有模块都预加载。
      //preloadingStrategy: PreloadAllModules
      // 自定义预加载策略
      preloadingStrategy: MypreloadService
    })
  ],
  declarations: [
    LoginComponent,
    UsercoreComponent,
    WjmmComponent,
    NotfindCompontent, DynaCompArr,  ////动态组件 或者 动态组件数组
    // 组件
    ZhzsComponent,
    YwclComponent,
    BmsjkdComponent,
    TjbbSjbcktjComponent,
    TjbbSjbcrktjZHComponent,
    TjbbSbzlComponent,
    TjbbSbzlZHComponent,
    TjbbSbxqComponent,
    TjbbSbxqZHComponent,
    TjbbGjzlComponent,
    TjbbGjzlZHComponent,
    TjbbGjxqComponent,
    TjbbGjxqZHComponent,
    TjbbGjszComponent,
    // 第二个页面
    SjbxxglComponent,
    BqsbglComponent,
    ZdsbglComponent,
    SbgjglComponent,
    RyglComponent,
    CarglComponent,
    YyjhComponent,
    YyrwComponent,
    SjcrkComponent,
    ZdsbxTsgjComponent,
    BqsbxTsgjComponent,
    // 第三个页面
    LlSczdComponent,
    LlDzbqComponent,
    DlDzbqComponent,
    //==============
    JcsjSliderComponent,
    JcsjComponent,
    LsgJComponent,
    SsgJComponent,
    YyjhAddComponent,
    DlDzbqZHComponent,
    DlSczdComponent,
    LlDzbqZHComponent,
    LlSczdZHComponent,
    WbSliderComponent,
    WbComponent,
    GjhfComponent,
    TjbbSliderComponent,
    test1Component,
  ],
  entryComponents: [
    DynaCompArr   //动态组件 或者 动态组件数组
  ],
  exports: [
    RouterModule
  ]
})
export class AppRoutingModule {
}
